package com.example.blog.dao.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.joda.time.DateTime;

import java.util.Date;


@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName("article_info")
public class Article {
    @TableId(type = IdType.ASSIGN_ID)
    @JsonSerialize(using = ToStringSerializer.class)
    private Long aid;
    @JsonSerialize(using =ToStringSerializer.class)
    private Long authorId;
    private Long categoryId;
    @JsonSerialize(using =ToStringSerializer.class)
    private Long bodyId;
    private String title;
    private String cover;
    private String summary;
    private Date publishTime;
    private Date updateTime;
    private Integer isTop;
    private Integer isDraft;
    private Integer isDelete;
    private Integer viewCounts;
    private Integer commentCounts;
    private Integer likesCounts;
}
